package com.byxy.controller;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.byxy.entity.Book;
import com.byxy.service.BookService;


@Controller
@RequestMapping("/")
public class BookController {
	@Resource
	private BookService bookService;
	private Integer pos;
	private Integer rows;
	public Map<String, Object> list(Map<String, Object> data) {
		List<Book> list = new ArrayList<>();
		list=bookService.find(pos,rows);
		data.put("list", list);
		data.put("count", bookService.count());
		return data;
	}
}
